import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

export default function fundTradeAPI(api) {
  return {
    // 获取基金详细信息gateway/instrument-server/fund/queryFondInfo?type=0&secucode=18712407
    getFundInfo: (query) => api.get(`${config.interfaces.type5}instrument-server/fund/queryFondInfo`, query),
    // 指令下达
    SaveInstruction: (query) => api.post(`${config.interfaces.type1}fundTrade/saveInstruction`, query),
    // 保存簿记
    SaveInstructionw2: (query) => api.post(`${config.interfaces.type1}fundTrade/saveInstruction2`, query),
    // 簿记交收
    getTradeInstruction: (query) => api.get(`${config.interfaces.type1}tradeOperate/getTradeInstruction`, query),
    // 簿记编辑
    confirmEdit: (query) => api.get(`${config.interfaces.type1}bondTrade/fundConfirm`, query),
    // 存续管理
    tradeBookSave: (query) => api.post(`${config.interfaces.type1}bondTrade/saveInstruction3`, query),
    // 销售机构代码数据
    getSalesOrganizationCodeData: (query) => api.get(`${config.interfaces.type1}RxIssuer/queryRxIssuer`, query),
  };
}
